{include file="public/layout" /}
<body class="bodystyle" style="cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
{include file="member/left" /}
<div class="page min-hg-c-10" style="min-width:auto;margin-left:100px;">
    <div class="fixed-bar">
        <div class="item-title">
            <ul class="tab-base nc-row">
                <li>
                    <a {if condition="in_array($Request.action, ['log_off_index'])"}class="current"{/if} href='{:url("Member/log_off_index")}'><span>注销列表</span></a>
                </li>
                <li>
                    <a {if condition="in_array($Request.action, ['log_off_set'])"}class="current"{/if} href='{:url("Member/log_off_set")}'><span>注销设置</span></a>
                </li>
            </ul>
        </div>
    </div>
    <form class="form-horizontal" id="post_form" method="post">
        {$searchform.hidden|default=''}
        <div class="ncap-form-default">

            <dl class="row">
                <dt class="tit">
                    <label for="output_type">开启注销</label>
                </dt>
                <dd class="opt">
                    <label><input type="radio" name="data[users_open_log_off]" value="1" {if condition="!empty($data.users_open_log_off) && 1 == $data.users_open_log_off"}checked{/if}>开启</label>&nbsp;&nbsp;
                    <label><input type="radio" name="data[users_open_log_off]" value="0" {if condition="empty($data.users_open_log_off)"}checked{/if}>关闭</label>&nbsp;&nbsp;
                    <span class="err"></span>
                    <p class="notic">设置关闭,则无法注销会员</p>
                </dd>
            </dl>

            <dl class="row">
                <dt class="tit">
                    <label for="users_log_off_check">注销审核</label>
                </dt>
                <dd class="opt">
                    <label><input type="radio" name="data[users_log_off_check]" value="0" {if condition="empty($data.users_log_off_check)"}checked{/if}>开启</label>&nbsp;&nbsp;
                    <label><input type="radio" name="data[users_log_off_check]" value="1" {if condition="!empty($data.users_log_off_check) && 1 == $data.users_log_off_check"}checked{/if}>关闭</label>&nbsp;&nbsp;
                    <span class="err"></span>
                    <p class="notic">设置关闭,会员直接注销成功</p>
                </dd>
            </dl>

            <dl class="row">
                <dt class="tit">
                    <label>&nbsp;</label>
                </dt>
                <dd class="opt">
                    <a href="JavaScript:void(0);" onclick="check_submit()" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
                    <a href="JavaScript:void(0);" onclick="click_to_eyou_1575506523('https://www.eyoucms.com/plus/view.php?aid=30629&origin_eycms=1','会员注销标签使用方法')" >查看教程？</a>
                </dd>
            </dl>
        </div>
    </form>
</div>
<script type="text/javascript">

    $(document).ready(function(){
        // 表格行点击选中切换
        $('#flexigrid > table>tbody >tr').click(function(){
            $(this).toggleClass('trSelected');
        });

        // 点击刷新数据
        $('.fa-refresh').click(function(){
            location.href = location.href;
        });
    });

    // 判断输入框是否为空
    function check_submit(){
        layer_loading('正在处理');
        $.ajax({
            type : 'post',
            url : "{:url('Member/log_off_set', ['_ajax'=>1])}",
            data : $('#post_form').serialize(),
            dataType : 'json',
            success : function(res){
                layer.closeAll();
                if(res.code == 1){
                    layer.msg(res.msg, {shade: layer_shade, time: 800});
                }else{
                    showErrorMsg(res.msg);
                }
            },
            error: function(e){
                layer.closeAll();
                showErrorAlert(e.responseText);
            }
        });
    }
</script>
{include file="public/footer" /}